package com.iterator.bean.web.lc.OrderBean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 订单详情VO
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class OrderDetailVO {

    private UserBean user;
    private OrderItem order;
    private List<OrderGoodsBean> orderGoods;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class UserBean {

        private String nickname;
        private String avatar;
    }

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class OrderGoodsBean {

        private int id;
        private int orderId;
        private int goodsId;
        private String goodsName;
        private String goodsSn;
        private int productId;
        private int number;
        private double price;
        private String picUrl;
        private int comment;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private String addTime;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
        private String updateTime;
        private boolean deleted;
        private List<String> specifications;
    }
}
